package com.hddf.project.pojos;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

@Entity
@Table(name = "second_category")
public class SecondCategory {
	private int second_category_id;
	private String second_category_name;
	private int sort;
	private int first_category_id;
	private FirstCategory first_category;
	private List<ThirdCategory> thirdCategories;

	private int count;// 项目数量

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "second_category_id", nullable = false, unique = true)
	public int getSecond_category_id() {
		return second_category_id;
	}

	public void setSecond_category_id(int second_category_id) {
		this.second_category_id = second_category_id;
	}

	@Column(name = "second_category_name", nullable = false, unique = true)
	public String getSecond_category_name() {
		return second_category_name;
	}

	public void setSecond_category_name(String second_category_name) {
		this.second_category_name = second_category_name;
	}

	@Column(name = "first_category_id", nullable = false)
	public int getFirst_category_id() {
		return first_category_id;
	}

	public void setFirst_category_id(int first_category_id) {
		this.first_category_id = first_category_id;
	}

	@Column(name = "sort")
	public int getSort() {
		return sort;
	}

	public void setSort(int sort) {
		this.sort = sort;
	}

	@Transient
	public FirstCategory getFirst_category() {
		return first_category;
	}

	public void setFirst_category(FirstCategory first_category) {
		this.first_category = first_category;
	}

	@Transient
	public List<ThirdCategory> getThirdCategories() {
		return thirdCategories;
	}

	public void setThirdCategories(List<ThirdCategory> thirdCategories) {
		this.thirdCategories = thirdCategories;
	}

	@Transient
	public int getCount() {
		return count;
	}

	public void setCount(int count) {
		this.count = count;
	}

}
